{$CLEO .cs}

//-------------MAIN---------------
thread 'SJmissile' 
0000: NOP 

Model.Load(1582)
Model.Load(#MISSILE)

:NONAME_10
wait 0 
   Model.Available(1582)
else_jump @NONAME_10 

:NONAME_26
wait 0 
   Model.Available(#MISSILE)
else_jump @NONAME_26 
03CF: load_wav 14401 as 1 

:NONAME_49
wait 0 
03D0:   wav 1 loaded 
else_jump @NONAME_49 
28@ = -1 

:NONAME_71
wait 10 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @NONAME_143 
if 
   Actor.DrivingVehicleType($PLAYER_ACTOR, #HOTRING)
else_jump @NONAME_143 
if 
0AB1: call_scm_func @NONAME_1414 1 1 31@  
else_jump @NONAME_143

gosub @NONAME_157 

:NONAME_143
gosub @NONAME_398 
jump @NONAME_71 

:NONAME_157
if 
83D2:   not wav 1 ended 
else_jump @NONAME_174 
return 

:NONAME_174
30@ = Actor.CurrentCar($PLAYER_ACTOR)
0A8E: 29@ = 28@ + 1 // int 
if 
  29@ >= 8 
else_jump @NONAME_224 
29@ = 0 
28@ = -1 

:NONAME_224
if 
03CA:   object 0@(29@,8i) exists 
else_jump @NONAME_299 
29@ = 0 

:NONAME_251
if 
83CA:   not object 0@(29@,8i) exists 
else_jump @NONAME_278 
jump @NONAME_299 

:NONAME_278
29@ += 1 
  29@ > 7 
else_jump @NONAME_251 

:NONAME_299
if and
03CA:   object 0@(29@,8i) exists 
  29@ == 7 
else_jump @NONAME_328 
return 

:NONAME_328
0085: 28@ = 29@ // (int) 
0AB1: call_scm_func @NONAME_667 2 30@ 29@ 8@(29@,8i) 0@(29@,8i)  
097C: attach_wav 1 to_object 8@(29@,8i) 
03D1: play_wav 1 
0A8E: 16@(29@,8i) = 33@ + 300 // int 
return 

:NONAME_398
29@ = 0 

:NONAME_405
if and
03CA:   object 0@(29@,8i) exists 
03CA:   object 8@(29@,8i) exists 
else_jump @NONAME_644 
if and
001D:   33@ > 16@(29@,8i) // (int) 
0685:   object 8@(29@,8i) attached 
else_jump @NONAME_550 
0682: detach_object 8@(29@,8i) 0.0 0.0 0.0 collision_detection 0 
0A8E: 16@(29@,8i) = 33@ + 5000 // int 

:NONAME_550
if 
8685:   not object 8@(29@,8i) attached 
else_jump @NONAME_644 
0AB1: call_scm_func @NONAME_1105 3 8@(29@,8i) 30@ 0@(29@,8i)  
if 
001D:   33@ > 16@(29@,8i) // (int) 
else_jump @NONAME_644 
0AB1: call_scm_func @NONAME_1372 2 8@(29@,8i) 0@(29@,8i)  

:NONAME_644
29@ += 1 
  29@ > 7 
else_jump @NONAME_405 
return 

:NONAME_667
2@ = Object.Create(1582, 0.0, 0.0, 0.0)
098D: get_car 0@ extra_parts_angle 5@ 
5@ *= 100.0 
// angle of missile: 10,0 (180+10)
6@ = 190.0 
005B: 6@ += 5@ // (float) 
06BE: 7@ = car 0@ y_angle 
7@ *= -1.0 
10@ = 2.2 
10@ /= 7.0 
0093: 1@ = integer 1@ to_float 
006B: 10@ *= 1@ // (float) 
12@ = -1.1 
005B: 12@ += 10@ // (float) 

// offset missile to center launcher sx-dx
0681: attach_object 2@ to_car 0@ with_offset 0.54 10.00 0.27 rotation 6@ 7@ 0.0 
3@ = Object.Create(#MISSILE, 0.0, 0.0, 0.0)
069A: attach_object 3@ to_object 2@ with_offset 0.0 0.0 0.0 rotation 180.0 0.0 0.0 
Object.ToggleInMovingList(2@) = True
Object.SetImmunities(2@, 1, 1, 1, 1, 1)
04D9: object 2@ set_scripted_collision_check 1 
0906: set_object 2@ mass_to 100.0 // float 
0908: set_object 2@ turn_mass_to 750.0 // float 
Object.SetImmunities(3@, 1, 1, 1, 1, 1)
08D2: object 2@ scale_model 0.0001 
08D2: object 3@ scale_model 0.75 

0400: store_coords_to 6@ 7@ 8@ from_object 2@ with_offset 0.0 0.0 0.0 
073F: get_actor_in_sphere 6@ 7@ 8@ radius 1.0 with_pedtype_civilian 1 gang 1 criminal/prostitute 1 handle_as 9@ 
if 
056D:   actor 9@ defined 
else_jump @NONAME_1094 
0326: 10@ = create_actor 9@ fire 

:NONAME_1094
0AB2: ret 2 2@ 3@ 

:NONAME_1105
0400: store_coords_to 6@ 7@ 8@ from_object 0@ with_offset 0.0 -100.0 0.0 
0400: store_coords_to 9@ 10@ 11@ from_object 0@ with_offset 0.0 0.0 0.0 
016F: create_particle 3 rotation_factor 0.0 size 12.5 intensity 100 flags 255 255 255 at 9@ 10@ 11@ 
04D5: create_corona_at 9@ 10@ 11@ radius 5.0 type 1 flare 2 RGB 255 192 128 
09E5: create_flash_light_at 9@ 10@ 11@ RGB_mask 4095 4095 4095 radius 20.0 
0063: 6@ -= 9@ // (float) 
0063: 7@ -= 10@ // (float) 
0063: 8@ -= 11@ // (float) 
05A1: set_object 0@ rotation_velocity_about_an_axis -0.05 0.0 0.0 through_center_of_body 
Object.Throw(0@, 6@, 7@, 8@)
if 
04DA:   has_object 0@ collided 
else_jump @NONAME_1367 
if 
0897:   car 1@ collided_with_object 0@ 
else_jump @NONAME_1351 
jump @NONAME_1367 

:NONAME_1351
0AB1: call_scm_func @NONAME_1372 2 0@ 2@  

:NONAME_1367
0AB2: ret 0 

:NONAME_1372
Object.StorePos(0@, 3@, 4@, 5@)
Object.Destroy(0@)
Object.Destroy(1@)
020C: create_explosion_with_radius 6 at 3@ 4@ 5@ 
0AB2: ret 0 

:NONAME_1414
32@ = 0 
if 
00E1:   player 0 pressed_key 4  // Secondary fire
else_jump @NONAME_1469 

wait 0
if
010F:   player $PLAYER_CHAR wanted_level > 0
jf @wl1
jump @go
:wl1
010D: set_player $PLAYER_CHAR wanted_level_to 1
:go

:NONAME_1437
00E1:   player 0 pressed_key 4 // Secondary fire
else_jump @NONAME_1460 

wait 0
if
010F:   player $PLAYER_CHAR wanted_level > 0
jf @wl2
jump @go2
:wl2
010D: set_player $PLAYER_CHAR wanted_level_to 1
:go2

jump @NONAME_1437 

:NONAME_1460
0485:   return_true 
jump @NONAME_1471 

:NONAME_1469
059A:   return_false 

:NONAME_1471
0AB2: ret 1 32@ 